
<?php echo CHtml::beginForm(); ?>
<?php echo CHtml::errorSummary($form); ?>
<div class="row">
<?php echo CHtml::activeLabel($form,'username'); ?>
<br/>
<?php echo CHtml::activeTextField($form,'username') ?>
</div>
<div class="row">
<?php echo CHtml::activeLabel($form,'password'); ?>
<br/>
<?php echo CHtml::activePasswordField($form,'password') ?>
</div>

<?php if (Yii::app()->user->getState('action') == 'register'): ?>

<div class="row">
<?php echo CHtml::activeLabel($form,'password_repeat'); ?>
<br/>
<?php echo CHtml::activePasswordField($form,'password_repeat') ?>
</div>
<div class="row">
<?php echo CHtml::activeLabel($form,'email'); ?>
<br/>
<?php echo CHtml::activeTextField($form,'email') ?>
</div>

<div class="row">
<?php echo CHtml::submitButton('Register'); ?>
</div>

<?php else: ?>

<div class="row">
<?php echo CHtml::activeCheckBox($form,'rememberMe'); ?>
<?php echo CHtml::activeLabel($form,'rememberMe'); ?>
</div>
<div class="row">
<?php echo CHtml::submitButton('Login'); ?>
</div>

<?php endif; ?>

<?php echo CHtml::endForm(); ?>
